#ifndef CONFIGDATA_AISINO
#define CONFIGDATA_AISINO

#include <map>
#include <string>


const std::string AISINO_CONFIG_KEY_AND_VALUE_TAG       =           "=";
const std::string AISINO_EMPTY_STRING                   =           "";
const std::string AISINO_CONFIG_FILE                    =           "aisino_cfg";
const std::string AISINO_SINGLE_DATABASE_FILE           =           "database_single";
const std::string AISINO_MULTIPLE_DATABASE_FILE         =           "database_multiple";
const std::string AISINO_EXAM_FILE                      =           "aisinoexam_file";
const std::string AISINO_QUESTION_NUM_PREFIX            =           "q_num_pre";
const std::string AISINO_QUESTION_NUM_SUFFIX            =           "q_num_suf";
const std::string AISINO_QUESTION_TEXT_PREFIX           =           "q_text_pre";
const std::string AISINO_QUESTION_TEXT_SUFFIX           =           "q_text_suf";
const std::string AISINO_ANSWER_TEXT_PREFIX             =           "a_text_pre";
const std::string AISINO_ANSWER_TEXT_SUFFIX             =           "a_text_suf";
const std::string AISINO_OUTPUT_FILE_NAME               =           "output_file";
const std::string AISINO_OUTPUT_FILE_FLAG               =           "output_flag";



class ConfigData
{
public:
    ConfigData();
    ~ConfigData();


public:
    bool loadConfigFile(const std::string fileName = AISINO_CONFIG_FILE_NAME );
    const std::string& getConfigValue(const std::string key);
    bool setConfigValue(const std::string key,std::string value);

private:
    std::map<std::string,std::string> config;

private:
    void initConfigKeys();

private:
    static const std::string CONFIG_KEYS[];
    static const std::string AISINO_CONFIG_FILE_NAME;
};



#endif // CONFIGDATA_AISINO
